/*
 * @Author: mia.chen mia.chen@webpowerchina.com
 * @Date: 2024-01-17 16:57:42
 * @LastEditors: mia.chen mia.chen@webpowerchina.com
 * @LastEditTime: 2024-01-18 11:04:41
 * @FilePath: \learn-project\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { RouteRecordRaw, createRouter, createWebHashHistory } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: '/ali',
    name: 'ali',
    meta: { name: '阿里矢量图' }, 
    component: () => import("@/views/icon/index.vue"),
  },
  {
    path: '/video-monitor',
    name: 'VideoMonitor',
    meta: { name: 'VideoMonitor' },
    component: () => import("@/views/videoMonitor/index.vue"),
  },
  {
    path: '/video-stats',
    name: 'VideoStats',
    meta: { name: 'VideoStats' },
    component: () => import("@/views/videoStats/index.vue"),
  },
  // {
  //   path: '/waterfall-flow',
  //   name: 'WaterfallFlow',
  //   meta: { name: '瀑布流' },
  //   component: () => import("@/views/waterfallFlow/index.vue"),
  // },
  {
    path: '/page1',
    name: 'page1',
    meta: { name: 'page1' }, 
    component: () => import("@/views/page1/index.vue"),
  },
  {
    path: '/page2',
    name: 'page2',
    meta: { name: 'page2' }, 
    component: () => import("@/views/page2/index.vue"),
  },
  {
    path: '/page3',
    name: 'page3',
    meta: { name: 'page3' }, 
    component: () => import("@/views/page3/index.vue"),
  },
  {
    path: '/page4',
    name: 'page4',
    meta: { name: 'page4' }, 
    component: () => import("@/views/page4/index.vue"),
  },
  {
    path: '/page5',
    name: 'page5',
    meta: { name: 'page5' }, 
    component: () => import("@/views/page5/index.vue"),
  },
  // 其他路由配置...
];

export const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
export const routesList = routes;

// 可以在这里添加全局守卫等高级路由配置
router.beforeEach((to, from, next) => {
  // ...
  next();
});